﻿namespace K9Nano.Pushing;

/// <summary>
/// 短信发送器接口
/// </summary>
public interface ISmsSender
{
    /// <summary>
    /// 发到普通短信
    /// </summary>
    /// <param name="phone">接收手机号</param>
    /// <param name="message">短信内容</param>
    ValueTask<bool> SendAsync(string phone, string message, CancellationToken cancellation);

    /// <summary>
    /// 发送模板短信
    /// </summary>
    /// <param name="phone">接收手机号</param>
    /// <param name="temlateId">模板ID</param>
    /// <param name="tempateParams">模板变量</param>
    /// <returns></returns>
    ValueTask<bool> SendTemplateAsync(string phone, string temlateId, string[] tempateParams, CancellationToken cancellation);
}

